package com.quanshu.shop.limit.adapter;

import android.support.annotation.Nullable;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.quanshu.exchange.R;
import com.quanshu.shop.limit.entity.LimiteTitleEntity;

import java.util.List;

/**
 * 作者  李哲
 * 创建时间 2018/9/19
 * 邮箱 lizhetongliao@163.com
 * 说明
 **/
public class LImiteMainTitleAdapter extends BaseQuickAdapter<LimiteTitleEntity, BaseViewHolder> {
    public LImiteMainTitleAdapter(@Nullable List<LimiteTitleEntity> data) {
        super(R.layout.item_limite_main_title, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, LimiteTitleEntity item) {
        helper.setText(R.id.limit_title_txt, item.getTitle());
        TextView textView = helper.getView(R.id.limit_title_txt);
        if (item.isSelelct()) {
            textView.setEnabled(false);
        } else {
            textView.setEnabled(true);
        }
        helper.addOnClickListener(R.id.limit_title_txt);
    }
}
